package com.lovo.exception;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class TestException1 {

    public void a() throws  LovoException{
        b();
    }
    public void b() throws LovoException{
        c();
    }
    public void c() throws LovoException {
        try{
            int a = 100 / 0;
        }catch (ArithmeticException e){
            LovoException lovoException = new LovoException("除零异常");
            lovoException.setStatus(10000);
            throw lovoException;
        }catch(Exception e){
            throw new LovoException("未知异常");
        }
    }

    public static void main(String[] args)throws FileNotFoundException {
        TestException1 testException1 = new TestException1();
        try {
            testException1.a();
        } catch (LovoException e) {
            System.out.println(e.getMessage());
        }
    }
}
